import type { TableColumn } from '@/components/core/dynamic-table';
// import { Avatar, Space, Tag } from 'ant-design-vue';

export type TableListItem = API.CategaryListResultItem;
export type TableColumnItem = TableColumn<TableListItem>;

export const baseColumns: TableColumnItem[] = [
  {
    title: '分类名称',
    dataIndex: 'name',
    width: 240,
    fixed: 'left',
  },
  {
    title: '类别代码',
    dataIndex: 'categaryCode',
    align: 'center',
    width: 140,
  },
  {
    title: '是否启用',
    dataIndex: 'visible',
    align: 'center',
    width: 80,
    customRender: ({ record }) => {
      const isEnable = record.visible === '1';
      return isEnable ? '否' : '是';
    },
  },
  {
    title: '系统编码',
    dataIndex: 'sysCode',
    align: 'center',
    width: 80,
  },
  {
    title: 'lable信息',
    width: 200,
    align: 'center',
    dataIndex: 'lableName',
  },
  {
    title: '排序号',
    width: 80,
    align: 'center',
    dataIndex: 'orderNum',
  },
  {
    title: '更新时间',
    width: 180,
    align: 'center',
    dataIndex: 'updateTime',
  },
];
